import { defHttp } from "@/utils/http";
import { baseUrlApi } from "./utils";

/** 采购计划列表带分页 */
export const getPurchasePlanPageList = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/purchase/plan/pagelist"),
    data
  });
};
/** 查询采购计划单号列表 */
export const getPurchasePlanList = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/purchase/plan/list"),
    data
  });
};
/** 采购计划详情 */
export const getPurchasePlanDetail = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/purchase/plan/detail"),
    data
  });
};

/** 采购计划详情列表 */
export const getPurchasePlanDetailPageList = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/purchase/plan/detail/pagelist"),
    data
  });
};

/** 采购计划详情批量转换生产任务 */
export const getPurchasePlanDetailBatchConvertProduce = <T>(data?: object) => {
  return defHttp.post<T>({
    url: baseUrlApi("/purchase/plan/detail/batchConvertProduceTask"),
    data
  });
};